/*
 * Copyright (c) GoKeep by gokeep.org. 2022-2023. All rights reserved
 */
package org.gokeep.application.rest;

import jakarta.annotation.Resource;
import org.gokeep.application.service.AuthService;
import org.gokeep.common.dto.AuthDto;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/auth")
public class AuthApi {
    @Resource
    private AuthService authService;
    /**
     * 获取权限认证token
     * @param auth
     * @return
     */
    @PostMapping
    public String auth(@RequestBody AuthDto auth) {
        return authService.auth(auth);
    }
}